package com.biz.primus.ms.commodity.trans;

import com.biz.primus.commodity.vo.ExtendDetailVo;
import com.biz.primus.common.utils.CopyUtils;
import com.biz.primus.ms.commodity.dao.po.Extend;
import com.google.common.base.Function;

import javax.annotation.Nullable;

public class Extend2ExtendDetailVo implements Function<Extend,ExtendDetailVo> {
    @Nullable
    @Override
    public ExtendDetailVo apply(@Nullable Extend extend) {
        ExtendDetailVo extendDetailVo = new ExtendDetailVo();
        CopyUtils.copyProperties(extend,extendDetailVo);
        extendDetailVo.setId(String.valueOf(extend.getId()));
        extendDetailVo.setOptions(extend.getOptions());
        extendDetailVo.setCategoryId(String.valueOf(extend.getCategoryId()));
        return extendDetailVo;
    }
}
